package com.yjc.springcloud.service.impl;

import com.yjc.springcloud.bean.Payment;
import com.yjc.springcloud.mapper.PaymentMapper;
import com.yjc.springcloud.service.PaymentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author shkstart
 * @create 2022-07-12 20:36
 */
@Service
public class PaymentServiceImpl implements PaymentService {

    @Autowired
    PaymentMapper paymentMapper;

    @Override
    public int addPayMent(Payment payment) {
        int res = paymentMapper.insertPayMent(payment);
        return res;
    }

    @Override
    public Payment getPaymentById(Long id) {
        Payment payment = paymentMapper.selectPaymentById(id);
        return payment;
    }
}
